/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 * http://www.gnu.org/copyleft/gpl.html
 */
package l1j.server.server.serverpackets;

import l1j.server.server.model.Instance.L1PcInstance;

public class S_UseMap extends ServerBasePacket {
	private static final String S_USE_MAP = "[S] S_UseMap";

	public S_UseMap(final L1PcInstance pc, final int objid, final int itemid) {

		this.writeC(S_OPCODE_USEMAP);
		this.writeD(objid);

		switch (itemid) {
		case 40373:
			this.writeD(16);
			break;
		case 40374:
			this.writeD(1);
			break;
		case 40375:
			this.writeD(2);
			break;
		case 40376:
			this.writeD(3);
			break;
		case 40377:
			this.writeD(4);
			break;
		case 40378:
			this.writeD(5);
			break;
		case 40379:
			this.writeD(6);
			break;
		case 40380:
			this.writeD(7);
			break;
		case 40381:
			this.writeD(8);
			break;
		case 40382:
			this.writeD(9);
			break;
		case 40383:
			this.writeD(10);
			break;
		case 40384:
			this.writeD(11);
			break;
		case 40385:
			this.writeD(12);
			break;
		case 40386:
			this.writeD(13);
			break;
		case 40387:
			this.writeD(14);
			break;
		case 40388:
			this.writeD(15);
			break;
		case 40389:
			this.writeD(17);
			break;
		case 40390:
			this.writeD(18);
			break;
		}
	}

	@Override
	public byte[] getContent() {
		return this.getBytes();
	}

	@Override
	public String getType() {
		return S_USE_MAP;
	}
}